

import request from '@/utils/request'

// 查询表单列表
export function listTable(query) {
  return request({
    url: '/openform/formDef/list/formDef',
    method: 'get',
    params: query
  })
}
// 查询所有表单列表，简要信息
export function formList() {
  return request({
    url: '/openform/formDef/list/formDef/all',
    method: 'get'
  })
}
// 判断表单是否已存在
export function exists(key) {
  return request({
    url: '/openform/formDef/exists/formDef/'+key,
    method: 'get',
  })
}

//  查询表单详情
export function details(key) {
  return request({
    url: '/openform/formDef/formDef/key/'+key,
    method: 'get',
  })
}
//  保存表单
export function save(data) {
  return request({
    url: '/openform/formDef/save/formDef/key/'+data.formKey,
    method: 'post',
    data
  })
}

//  获取所有数据库表
export function getAllTableName(data) {
  return request({
    url: '/openform/formDef/table/getAllTableName',
    method: 'get',
    data
  })
}